#define _CRT_SECURE_NO_WARNINGS 1
class CQueue {
public:
    CQueue() {

    }

    void appendTail(int value)
    {
        _inBook.push(value);
    }

    int deleteHead()
    {
        if (_outBook.empty())
        {
            if (_inBook.empty())
            {
                return -1;
            }
            while (!_inBook.empty())
            {
                _outBook.push(_inBook.top());
                _inBook.pop();
            }
        }
        int ret = _outBook.top();
        _outBook.pop();
        return ret;
    }
private:
    stack<int> _inBook;
    stack<int> _outBook;
};

/**
 * Your CQueue object will be instantiated and called as such:
 * CQueue* obj = new CQueue();
 * obj->appendTail(value);
 * int param_2 = obj->deleteHead();
 */